<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
    <title>{{ if not .sensitive_mode }}Goploader{{ else }}Upload{{ end }}</title>
    {{ if not .sensitive_mode }}
    <meta name="description" content="Simple file hosting with server-side encryption." />
    <meta property="og:title" content="Simple file hosting with server-side encryption." />
    <meta property="og:description" content="Simple file hosting with server-side encryption." />
    <link rel="shortcut icon" type="image/png" href="/static/favicon.ico" /> {{ end }}
    <link rel="stylesheet" target="blank" href="https://fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic">
    <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.css">
    <link rel="stylesheet" type="text/css" href="/static/milligram.min.css">
    <link rel="stylesheet" type="text/css" href="/static/toastr.css" />
    <link rel="stylesheet" type="text/css" href="/static/style.css">
    <link rel="manifest" href="/static/manifest.json">
</head>

<body>
    <main class="wrapper">
        {{ if .fulldoc }} {{ if not .sensitive_mode }}
        <nav class="navigation">
            <section class="container">
                <ul class="navigation-list float-right">
                    <li class="navigation-item">
                        <a class="navigation-link" href="#" id="toggle-upload">Upload</a>
                    </li>
                    <li class="navigation-item">
                        <a class="navigation-link" href="#" id="toggle-introduction">Introduction</a>
                    </li>
                    <li class="navigation-item">
                        <a class="navigation-link" href="#" id="toggle-client">Client</a>
                    </li>
                    <li class="navigation-item">
                        <a class="navigation-link" href="#" id="toggle-curl">Curl</a>
                    </li>
                    <li class="navigation-item">
                        <a class="navigation-link" href="#" id="toggle-server">Server</a>
                    </li>
                    <li class="navigation-item">
                        <a class="navigation-link" href="https://github.com/Depado/goploader" target="_blank">Github</a>
                    </li>
                </ul>
            </section>
        </nav>
        {{ end }} {{ end }}
        <section id="upload" class="container" style="text-align:center;">
            <h1 class="title">Goploader</h1>
            <h2>Because file sharing is meant to be easy</h2>
            <form id="upload-form">
                <fieldset class="container">
                    <div class="row">
                        <input id="source" type="checkbox" name="source">
                        <label class="label-inline" for="source">File</label>
                    </div>
                    <div class="row">
                        <textarea id="upload-text" placeholder="Paste your text here…" style="display: none;"></textarea>
                        <input type="file" name="file" id="upload-file" class="inputfile" />
                        <label for="upload-file">
                            <svg xmlns="http://www.w3.org/2000/svg" width="20" height="17" viewbox="0 0 20 17">
                                <path d="M10 0l-5.2 4.9h3.3v5.1h3.8v-5.1h3.3l-5.2-4.9zm9.3 11.5l-3.2-2.1h-2l3.4 2.6h-3.5c-.1 0-.2.1-.2.1l-.8 2.3h-6l-.8-2.2c-.1-.1-.1-.2-.2-.2h-3.6l3.4-2.6h-2l-3.2 2.1c-.4.3-.7 1-.6 1.5l.6 3.1c.1.5.7.9 1.2.9h16.3c.6 0 1.1-.4 1.3-.9l.6-3.1c.1-.5-.2-1.2-.7-1.5z"></path>
                            </svg><span>Choose a file…</span>
                        </label>
                    </div>
                    <div class="row">
                        <select name="duration" id="duration" style="width: 100%; margin-bottom: 0.5rem; text-align-last: center;">
                            <option value="30m">30 minutes</option>
                            <option value="1h">1 hour</option>
                            <option value="6h">6 hours</option>
                            <option value="1d">1 day</option>
                            <option value="1w">1 week</option>
                        </select>
                    </div>
                    <div class="row">
                        <input id="one-view" type="checkbox" name="once">
                        <label class="label-inline" for="one-view">No Restriction</label>
                    </div>
                    <p id="upload-error" style="display: none;"></p>
                    <p><span id="upload-summary"></span> Maximum size : {{.size_limit}}</p>
                    <a class="button button-outline" href="#" id="upload-btn">Upload</a>
                </fieldset>
            </form>
            <br />
            <div id="upload-result" style="display: none; text-align: center;">
                <p id="upload-url"></p>
                <br />
                <div class="container">
                    <div class="row">
                        <div class="column">
                            <select id="language">
                                <option value="none">No Language</option>
                                <option value="markup">Markup</option>
                                <option value="css">CSS</option>
                                <option value="clike">C-like</option>
                                <option value="javascript">JavaScript</option>
                                <option value="abap">ABAP</option>
                                <option value="actionscript">ActionScript</option>
                                <option value="ada">Ada</option>
                                <option value="apacheconf">Apache Configuration</option>
                                <option value="apl">APL</option>
                                <option value="applescript">AppleScript</option>
                                <option value="asciidoc">AsciiDoc</option>
                                <option value="aspnet">ASP.NET (C#)</option>
                                <option value="autoit">AutoIt</option>
                                <option value="autohotkey">AutoHotkey</option>
                                <option value="bash">Bash</option>
                                <option value="basic">BASIC</option>
                                <option value="batch">Batch</option>
                                <option value="bison">Bison</option>
                                <option value="brainfuck">Brainfuck</option>
                                <option value="bro">Bro</option>
                                <option value="c">C</option>
                                <option value="csharp">C#</option>
                                <option value="cpp">C++</option>
                                <option value="coffeescript">CoffeeScript</option>
                                <option value="crystal">Crystal</option>
                                <option value="css-extras">CSS Extras</option>
                                <option value="d">D</option>
                                <option value="dart">Dart</option>
                                <option value="django">Django/Jinja2</option>
                                <option value="diff">Diff</option>
                                <option value="docker">Docker</option>
                                <option value="eiffel">Eiffel</option>
                                <option value="elixir">Elixir</option>
                                <option value="erlang">Erlang</option>
                                <option value="fsharp">F#</option>
                                <option value="fortran">Fortran</option>
                                <option value="gherkin">Gherkin</option>
                                <option value="git">Git</option>
                                <option value="glsl">GLSL</option>
                                <option value="go">Go</option>
                                <option value="graphql">GraphQL</option>
                                <option value="groovy">Groovy</option>
                                <option value="haml">Haml</option>
                                <option value="handlebars">Handlebars</option>
                                <option value="haskell">Haskell</option>
                                <option value="haxe">Haxe</option>
                                <option value="http">HTTP</option>
                                <option value="icon">Icon</option>
                                <option value="inform7">Inform 7</option>
                                <option value="ini">Ini</option>
                                <option value="j">J</option>
                                <option value="jade">Jade</option>
                                <option value="java">Java</option>
                                <option value="jolie">Jolie</option>
                                <option value="json">JSON</option>
                                <option value="julia">Julia</option>
                                <option value="keyman">Keyman</option>
                                <option value="kotlin">Kotlin</option>
                                <option value="latex">LaTeX</option>
                                <option value="less">Less</option>
                                <option value="livescript">LiveScript</option>
                                <option value="lolcode">LOLCODE</option>
                                <option value="lua">Lua</option>
                                <option value="makefile">Makefile</option>
                                <option value="markdown">Markdown</option>
                                <option value="matlab">MATLAB</option>
                                <option value="mel">MEL</option>
                                <option value="mizar">Mizar</option>
                                <option value="monkey">Monkey</option>
                                <option value="nasm">NASM</option>
                                <option value="nginx">nginx</option>
                                <option value="nim">Nim</option>
                                <option value="nix">Nix</option>
                                <option value="nsis">NSIS</option>
                                <option value="objectivec">Objective-C</option>
                                <option value="ocaml">OCaml</option>
                                <option value="oz">Oz</option>
                                <option value="parigp">PARI/GP</option>
                                <option value="parser">Parser</option>
                                <option value="pascal">Pascal</option>
                                <option value="perl">Perl</option>
                                <option value="php">PHP</option>
                                <option value="php-extras">PHP Extras</option>
                                <option value="powershell">PowerShell</option>
                                <option value="processing">Processing</option>
                                <option value="prolog">Prolog</option>
                                <option value="properties">.properties</option>
                                <option value="protobuf">Protocol Buffers</option>
                                <option value="puppet">Puppet</option>
                                <option value="pure">Pure</option>
                                <option value="python">Python</option>
                                <option value="q">Q</option>
                                <option value="qore">Qore</option>
                                <option value="r">R</option>
                                <option value="jsx">React JSX</option>
                                <option value="reason">Reason</option>
                                <option value="rest">reST (reStructuredText)</option>
                                <option value="rip">Rip</option>
                                <option value="roboconf">Roboconf</option>
                                <option value="ruby">Ruby</option>
                                <option value="rust">Rust</option>
                                <option value="sas">SAS</option>
                                <option value="sass">Sass (Sass)</option>
                                <option value="scss">Sass (Scss)</option>
                                <option value="scala">Scala</option>
                                <option value="scheme">Scheme</option>
                                <option value="smalltalk">Smalltalk</option>
                                <option value="smarty">Smarty</option>
                                <option value="sql">SQL</option>
                                <option value="stylus">Stylus</option>
                                <option value="swift">Swift</option>
                                <option value="tcl">Tcl</option>
                                <option value="textile">Textile</option>
                                <option value="twig">Twig</option>
                                <option value="typescript">TypeScript</option>
                                <option value="vbnet">VB.Net</option>
                                <option value="verilog">Verilog</option>
                                <option value="vhdl">VHDL</option>
                                <option value="vim">vim</option>
                                <option value="wiki">Wiki markup</option>
                                <option value="xojo">Xojo (REALbasic)</option>
                                <option value="yaml">YAML</option>
                            </select>
                        </div>
                        <div class="column">
                            <input id="lines" type="checkbox" name="lines">
                            <label class="label-inline" for="lines">No Lines</label>
                        </div>
                        <div class="column">
                            <input id="theme" type="checkbox" name="theme">
                            <label class="label-inline" for="theme">Dark Theme</label>
                        </div>
                    </div>
                    <div class="row">
                        <div class="column column-50">
                            <button id="upload-clipboard" class="button button-outline" style="width: 100%;" data-clipboard-text="">Copy to Clipboard</button>
                        </div>
                        <div class="column column-50">
                            <a class="button button-outline" style="width: 100%;" href="#" id="upload-again">Upload Another File</a>
                        </div>
                    </div>
                </div>
            </div>
            <div class="container" id="upload-loader" style="display: none;">
                <div class="row">
                    <div class="column column-offset-50">
                        <div class="circle circle1"></div>
                        <div class="circle circle2"></div>
                    </div>
                </div><br /><br />
                <div class="row">
                    <div class="progress">
                        <div></div>
                    </div>
                </div>
            </div>
        </section>
    </main>
    <script src="/static/jquery.min.js"></script>
    <script src="/static/clipboard.min.js"></script>
    <script src="/static/toastr.min.js"></script>
    <script src="/static/custom.js"></script>
    <script>
        if ('serviceWorker' in navigator) {
            window.addEventListener('load', function() {
                navigator.serviceWorker.register('/sw.js').then(function(registration) {
                    console.log('ServiceWorker registration successful with scope: ', registration.scope);
                }, function(err) {
                    console.log('ServiceWorker registration failed: ', err);
                });
            });
        }
    </script>
</body>

</html>
